<?php

//聚集类，职责是保存数据集
class ConcreteAggregate {
    private $items;

    public function __construct($items)
    {
        $this->items = $items;
    }

    public function getCount()
    {
        return count($this->items);
    }

    public function getItem($index)
    {
        return $this->items[$index];
    }
}